<?
$filter = new FilterVysledky();
$filter->sezona = SEASON;
$filter->soutezni = 1;

echo "<table class='centered small-table'>";
    
    $query1 = getRounds(SEASON);
    
    while($fetch1 = MySQL_Fetch_Array($query1)) {
      $kolo = $fetch1["kolo"];
      
      $filter->kolo = $kolo;
      
      echo "<tr>";
        echo "<th colspan='4'>$kolo. kolo</th>";
      echo "</tr>";
      
      $query2 = getResults($filter);
      
      $idx = 0;
      while($fetch2 = MySQL_Fetch_Array($query2)){
          $datum = DateFormat::format($fetch2["datum"], DF_DDMMYYYYHHMM);
          $domaci = $fetch2["domaci"];
          $hoste = $fetch2["hoste"];
          $vysledek = $fetch2["b_domaci"]." : ".$fetch2["b_hoste"];
          
          if($idx % 2 == 0){ echo "<tr>"; }
          else { echo "<tr class='second'>"; }
            echo "<td>$datum</td><td class='righted'>$domaci</td>";
            echo "<td>$vysledek</td><td class='lefted'>$hoste</td>";
          echo "</tr>";
          $idx ++;
      }
    }

echo "</table>";
?>